<script type="text/javascript" src="components/sanpham/js.js"></script>


<div class="art-post">
                                <div class="art-post-tl"></div>
                                <div class="art-post-tr"></div>
                                <div class="art-post-bl"></div>
                                <div class="art-post-br"></div>
                                <div class="art-post-tc"></div>
                                <div class="art-post-bc"></div>
                                <div class="art-post-cl"></div>
                                <div class="art-post-cr"></div>
                                <div class="art-post-cc"></div>
                                <div class="art-post-body">
                            <div >
                                            <div class="art-postmetadataheader">
                                                <h2 class="art-postheader">
                                                    <img src="images/postheadericon.png" width="32" height="32" alt="postheadericon" />
                                                    Tìm Kiếm Cơ Bản
                                                </h2>
                                            </div>
                                            <div class="art-postcontent"><br/>
                                                <!-- article-content -->
                                                
<?php 
include_once ('components/danhmuc/class_danhmuc.php');

function ComboboxHienThiDanhMucCap1()
{
	$strPre = '';
	$dm = new class_danhmuc();
	$tb = $dm->HienThiDanhMucCap1();
	foreach($tb as $row)
	{
		echo '<option value="'.$row['MaDanhMuc'].'">'.$row['TenDanhMuc'].'</option>';
		ComboboxHienThiDanhMucCap2TroLen($row['MaDanhMuc'], $strPre);

	}
}
	
function ComboboxHienThiDanhMucCap2TroLen($MaDanhMucCha, $strPre)
{
	$strPre .= '----';
	$dm = new class_danhmuc();
	if ($dm->GetNumRowsDanhMucCap2TroLen($MaDanhMucCha) == 0)
	{
		return;
	}
	$tb = $dm->HienThiDanhMucCap2TroLen($MaDanhMucCha);

	foreach ($tb as $row)
	{
		echo '<option value="'.$row['MaDanhMuc'].'">'.$strPre.$row['TenDanhMuc'].'</option>';
		ComboboxHienThiDanhMucCap2TroLen($row['MaDanhMuc'], $strPre);

	}

}

?>

<div align="center">
<table width="402" border="0">
  <tr>
    <td width="86">Sản phẩm</td>
    <td width="300"><input name="txtSanPham" type="text" id="txtSanPham" value="" size="50" /></td>
  </tr>
  <tr>
    <td>Người bán</td>
    <td><input name="txtNguoiBan" type="text" id="txtNguoiBan" value="" size="50" /></td>
  </tr>
  <tr>
    <td>Nhà sản xuất</td>
    <td><input name="txtNhaSanXuat" type="text" id="txtNhaSanXuat" value="" size="50" /></td>
  </tr>
  <tr>
    <td>Mô tả</td>
    <td><input name="txtMoTa" type="text" id="txtMoTa" value="" size="50" /></td>
  </tr>
  <tr>
    <td>Danh mục</td>
    <td>
    	<select name="cbxDanhMuc" id="cbxDanhMuc">
        	<option value="0" selected="selected">Tất cả</option>
            <?php 
				ComboboxHienThiDanhMucCap1();
			?>
		</select>
    </td>
  </tr>
  <tr>
    <td align="center" colspan="2">
    	<span class="art-button-wrapper">
          <span class="l"> </span>
          <span class="r"> </span>
    	<input class="art-button" id="btnTimKiem" name="btnTimKiem" type="button" value="Tìm Kiếm" onClick="TimKiemNangCao()" />
        </span>
    </td>
  </tr>
</table>
</div>


<?php

	// sản phẩm ///////////////////////////////////////////////////////////////////////////////////////
		echo '<div id="KetQuaTimKiem">';
//		include('timkiemnangcao_sanpham.php');
		echo '</div>';

	
?>

<!-- /article-content -->
                                            </div>
                                            <div class="cleared"></div>
                            </div>
                            
                            		<div class="cleared"></div>
                                </div>
                            </div>